package com.yonyou.cyxdms.sysAuth.service.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yonyou.cyx.framework.dao.base.SuperMapper;
import com.yonyou.cyxdms.sysAuth.service.entity.ComOrganizationPO;
import com.yonyou.cyxdms.sysAuth.service.vo.companyorg.CompanyOrgMaintenanceTreeVO;
import com.yonyou.cyxdms.sysAuth.service.vo.companyorg.CompanyOrgPageVO;
import com.yonyou.cyxdms.sysmanage.client.vo.company.CompanyOrgVO;

import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 公司组织 Mapper 接口
 * </p>
 *
 * @author quankk
 * @since 2019-07-05
 */
public interface ComOrganizationMapper extends SuperMapper<ComOrganizationPO> {

    /**
     * 分页查询公司组织
     *
     * @param page
     * @param queryCondition
     * @return java.util.List<com.yonyou.cyxdms.sysAuth.service.vo.companyorg.CompanyOrgPageVO>
     * @author renwd
     * @since 2019/7/8
     */
    List<CompanyOrgPageVO> pageComOrganization(Page page, @Param("params") Map<String, Object> queryCondition);

    /**
     * 公司组织树
     *
     * @param appId      appId
     * @param companyId companyId
     * @return java.util.List<com.yonyou.cyxdms.sysAuth.service.vo.companyorg.CompanyOrgMaintenanceTreeVO>
     * @author renwd
     * @since 2019/7/8
     */
    List<CompanyOrgMaintenanceTreeVO> getComOrgTree(@Param("appId") String appId, @Param("companyId") Long companyId);
    /**
     * 公司组织树
     *
     * @param appId      appId
     * @param companyId companyId
     * @return java.util.List<com.yonyou.cyxdms.sysAuth.service.vo.companyorg.CompanyOrgMaintenanceTreeVO>
     * @author zw
     * @since 2020/7/16
     */
    List<CompanyOrgMaintenanceTreeVO> getComOrgTreeDistinct(@Param("appId") String appId, @Param("companyId") Long companyId);
    /**
     * 获取车厂所有组织
     *
     * @param appId      appId
     * @param companyId companyId
     * @return java.util.List<com.yonyou.cyxdms.sysmanage.client.vo.company.CompanyOrgVO>
     * @author zys
     * @since 2020/2/5
     */
    List<CompanyOrgVO> getComOrgAllTree(@Param("appId") String appId);
    
    List<Map> getIsValidOrganizationGMS(@Param("dataType") String dataType);

    List<CompanyOrgMaintenanceTreeVO> getComOrgTreeDrl(@Param("appId") String appId);
}
